import { h } from '@logicflow/core';
import BaseNode from './BaseNode';
import { RpcIcon } from '../icons';
class RpcRequestFromDeviceNode extends BaseNode.view {
	getIcon() {
		const { width, height, properties } = this.props.model;
		return h('image', {
			width: 30,
			height: 30,
			x: -width / 2,
			y: -height / 2,
			href: RpcIcon,
		});
	}
}

class RpcRequestFromDeviceNodeModel extends BaseNode.model {
	getNodeStyle() {
		const style = super.getNodeStyle();
		style.fill = 'rgb(230, 224, 248)';
		return style;
	}
}

export default {
	type: 'RpcRequestFromDeviceNode',
	model: RpcRequestFromDeviceNodeModel,
	view: RpcRequestFromDeviceNode,
};
